
#import "Controller.h"
#import <appkit/appkit.h>
#import "../SerialAndModem/Serial.h"

@implementation Controller

- init
{
	[super init];
	
	mySerial = [[Serial alloc] init];
	[mySerial openRAW:"/dev/cua" Baudrate:9600];
	[mySerial dropDTR];

	return self;
}

- changeDTR:sender
{
	static int	state = 0;
	
	if(state == 0) 
	{
		[mySerial raiseDTR];
		state = 1;
	}	
	else
	{
		[mySerial dropDTR];
		state = 0;
	}
	
	return self;
}	


@end
